<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <mata http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
     <!-- Import style -->
     <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
     <!-- Import Vue 3 -->
     <script src="https://unpkg.com/vue@3"></script>
     <!-- Import component library -->
     <script src="https://unpkg.com/element-plus"></script>
</head>
<body>
    <div id="app">
        <el-row>
            <el-col :span="12">
                <el-button type="primary" @click="isShow=!isShow">切换显示状态</el-button>
                <div v-show="isShow">
                   <img src="https://5b0988e595225.cdn.sohucs.com/images/20191116/c536bed0efdf4778a5dc40f3465ca8d5.jpeg">
        </div>
               
          </el-col>
          <el-col :span="12">
            <el-button type="primary" @click="age++">增加年龄</el-button>
            <el-button type="primary" @click="age=age-1">减少年龄</el-button>
            <p>年龄满足18岁， 可以入党。 目前年纪，{{age}}</p>
             <img v-show="age>=18" src="https://img0.baidu.com/it/u=3082349941,2367564274&fm=253&fmt=auto&app=138&f=PNG?w=736&h=416" >
        </el-col>
      </el-row>

    </div>
</body>
<script>
    const App = {
        data() {
            return{
                isShow: false,
                age: 18,
            }
        },
        methods:{}
    }

    Vue.createApp(App).use(ElementPlus).mount("#app")
</script>
</html>